package com.bjdd.jdy.ui.bankCard;

import com.bjdd.jdy.base.BaseResult;
import com.bjdd.jdy.entity.BankCardBean;
import com.bjdd.jdy.util.Api;
import com.bjdd.jdy.util.RxSchedulers;

import java.util.List;

import rx.Observable;

/**
 * Created by Administrator on 2017/5/10.
 */

public class BankCardModel implements BankCardContract.Model {

    @Override
    public Observable<BaseResult<List<BankCardBean>>> bankCards(String token, String carrierId) {
        return Api.getInstance().service
                .bankCards(token,carrierId)
                .compose(RxSchedulers.io_main());
    }

    @Override
    public Observable<BaseResult<String>> delCard(String token, String carrierId, String cardid) {
        return Api.getInstance().service
                .delBankCard(token,carrierId,cardid)
                .compose(RxSchedulers.io_main());
    }
}
